//
//  ShareClientInfo.m
//  ShareCenter
//
//  Created by yutao on 14-2-18.
//  Copyright (c) 2014年 yutao. All rights reserved.
//

#import "ShareClientInfo.h"


@interface ShareClientInfo ()

@property (nonatomic, assign) SNShareClientType       serviceType;
@property (nonatomic, assign) NSUInteger              limitation;

@property (nonatomic, copy) NSString *serviceName;
@property (nonatomic, copy) NSString *iconName;
@property (nonatomic, copy) NSString *highlightIconName;

@end

@implementation ShareClientInfo

@synthesize serviceType = _serviceType;
@synthesize limitation = _limitation;

@synthesize serviceName = _serviceName;
@synthesize iconName    = _iconName;
@synthesize highlightIconName = _highlightIconName;

- (void)dealloc
{
    [_serviceName release], _serviceName = nil;
    [_iconName release], _iconName = nil;
    [_highlightIconName release], _highlightIconName = nil;
    
    [super dealloc];
}

- (id)initWithType:(SNShareClientType)serviceType
              name:(NSString *)serviceName
          iconName:(NSString *)iconName
 highlightIconName:(NSString *)highlightIconName
{
    self = [super init];
    if (self) {
        self.serviceType = serviceType;
        self.serviceName = serviceName;
        self.iconName    = iconName;
        self.highlightIconName = highlightIconName;
    }
    
    return self;
}

+ (id)serviceInfoWithType:(SNShareClientType)serviceType
                     name:(NSString *)serviceName
                 iconName:(NSString *)iconName
        highlightIconName:(NSString *)highlightIconName
{
    ShareClientInfo *serviceInfo = [[[self class] alloc] initWithType:serviceType
                                                                    name:serviceName
                                                                iconName:iconName
                                                       highlightIconName:highlightIconName];
    
    return [serviceInfo autorelease];
}
@end
